package Test1230am;

public class Test09 {
    public static void main(String[] args) {


        // (9)求数组元素平均值
        int[] arr = {1,2,3,4,5};
        int avg =0;
        int sum = 0;
        for(int i=0;i<arr.length;i++){
            sum+=arr[i];
            avg = sum/ arr[i];

        }
        System.out.println(avg);
    }

}